
Use NEXUS_DB

GO
--------------------------------------Insert---------------
CREATE PROC insertOrderDetail
	@OrderID int,
	@PlanDetailID int,
	@Amount int
AS
INSERT INTO  OrderDetail(OrderID,PlanDetailID,Amount) VALUES(@OrderID,@PlanDetailID,@Amount) 
	
GO
----------------------------------------------getAllOrderDetailByOrderID----------------
CREATE PROC getAllOrderDetailByOrderID
	@OrderID varchar(11)
AS
SELECT     OrderDetail.*, PlanDetail.PlanDetailName
FROM         OrderDetail INNER JOIN
                      PlanDetail ON OrderDetail.PlanDetailID = PlanDetail.PlanDetailID
WHERE OrderID=@OrderID
GO



